package com.calm.editor.service;

import org.springframework.stereotype.Service;

import com.calm.editor.api.NodeService;
import com.calm.editor.entity.NodeElement;
import com.calm.editor.servlet.Event;

@Service("node")
public class NodeServiceImpl extends BaseServiceImpl<NodeElement, Integer> implements NodeService {
	@Event("loadNode")
	public NodeElement getById(Integer id) {
		return super.getById(id);
	}

	@Event("saveNode")
	public void update(NodeElement id) {
//		NodeElement byId = getById(id.getId());
//		byId.setElementId(id.getElementId());
		super.update(id);
	}

	@Override
	public Class<NodeElement> getEntityClass() {
		return NodeElement.class;
	}
}
